<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            background-color: pink;
            background-image: url(images/logo.png);
            background-repeat: no-repeat;
            /* 有严格的顺序：x轴是20像素，y轴是50像素 */
            /* background-position: 20px 50px; */
            /* 如果只写一个参数，那么默认是x轴的坐标，y轴是center */
            /* background-position: 20px; */
            /* 还可以混合单位 */
            /* x是20像素，y是垂直居中 */
            /* background-position: 20px center; */
            background-position: center 40px;
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>